<?php echo form_open($submit_uri);
if (isset($id))
    echo form_hidden('support_id', $id);
?>
<?php
if (!isset($username))
    $username = '';
if (!isset($password))
    $password = '';
if (!isset($fullname))
    $fullname = '';
if (!isset($email))
    $email = '';
if (!isset($phone))
    $phone = '';
if (!isset($address))
    $address = '';
?>
<div class="page_header">
    <h1 class="fleft"><?php if (isset($header)) echo $header; ?></h1>
    <small class="fleft">"Thêm Quản trị Viên"</small>
    <span class="fright"><a class="button back" href="/dashboard/users/" title="Quay lại trang quản lý"><em>&nbsp;</em>Quay lại trang quản lý</a></span>
    <br class="clear"/>
</div>

<div class="form_content">
<?php $this->load->view('powercms/message'); ?>
    <table>

        <tr><td class="title">Tên đăng Nhập (<span>*</span>)</td></tr>
        <tr>
            <td>
                <?php if(isset($is_edit)):?>
                    <?php echo form_input(array('name' => 'username', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $username, 'readonly' => TRUE, 'disable' => TRUE)); ?>
                <?php else:?>
                    <?php echo form_input(array('name' => 'username', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $username)); ?>
                <?php endif;?>
            </td>
        </tr>

        <tr><td class="title">Mật khẩu (<span>*</span>)</td></tr>
        <tr>
            <td>
                <?php echo form_password(array('name' => 'password', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $password)); ?>
                <?php if(isset($is_edit)):?>
                <br/><span style="color:red; font-style: italic;">Để trống ô mật khẩu nếu bạn không muốn thay đổi</span>
                <?php endif;?>
            </td>
        </tr>

        <tr><td class="title">Họ và tên: (<span>*</span>)</td></tr>
        <tr>
            <td>
<?php echo form_input(array('name' => 'fullname', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $fullname)); ?>
            </td>
        </tr>

        <tr><td class="title">Email(<span>*</span>)</td></tr>
        <tr>
            <td><?php echo form_input(array('name' => 'email', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $email)); ?></td>
        </tr>

        <tr><td class="title">Số điện thoại (<span>*</span>)</td></tr>
        <tr>
            <td><?php echo form_input(array('name' => 'phone', 'size' => '50', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $phone)); ?></td>
        </tr>

        <tr>
            <td class="title" style="vertical-align: top">Địa chỉ: (<span>*</span>)</td></tr>
        <tr>
            <td>
                <?php echo form_input(array('name' => 'address', 'maxlength' => '50', 'style' => 'width:260px;', 'value' => $address)); ?>
            </td>
        </tr>
        <tr>
            <td class="title" style="vertical-align: top">Quyền: (<span>*</span>)</td></tr>
        <tr>
            <td>
                <?php if(isset($role_combo)) echo $role_combo; ?>
            </td>
        </tr>
        <tr>
            <td style="padding-top: 5px;">
<?php echo form_submit(array('name' => 'btnSubmit', 'value' => $button_name, 'class' => 'button')); ?>
            </td>
        </tr>
    </table>
    <div style="margin-top: 10px;"></div>
</div>

<?php echo form_close(); ?>
